import { Injectable } from '@angular/core';
import { HttpService } from '../providers/HttpService';
import { FileService } from '../providers/FileService';
import * as constants from '../providers/Constants'
// import { File } from '@ionic-native/file/ngx';
@Injectable({
    providedIn: 'root'
})
export class FileUploadService {

    // constructor(public http: HttpService, public fileService: FileService,private  file: File) {
    // }
    // // 上传文件
    // fileUpload(data) {
    //     return this.http.upload(constants.ApiServeLogin.uploadFile, data, 'file');
    // }
    // 上传文件
    // ossUploadFile(data) {
    //     return this.http.post(constants.ApiServeNoLogin.ossUploadFile, data,{showLoading:false});
    // }
    // // 上传文件
    // fileUploadAliOss(data,file) {
    //     return this.http.httpAliYun(data,file);
    // }
    // downloadFile(fileName,filePath:string=''){
    //     let path=this.file.cacheDirectory;
    //     if (this.file.checkDir(path,'file')) {
    //         this.file.createDir(path,'file',true)
    //     }
    //     return this.http.downloadFile(fileName,path+'/file/'+fileName);
    // }
}
